﻿<Page
    x:Class="OpenRPOSMetro.CloseOrder"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:OpenRPOSMetro"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Page.Resources>
        <Style x:Key="ListViewItemStyleOpenRPOS" TargetType="ListViewItem">
            <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>            
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="TabNavigation" Value="Local"/>
            <Setter Property="IsHoldingEnabled" Value="True"/>
            <Setter Property="Margin" Value="0,0,18,2"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListViewItem">
                        <ListViewItemPresenter SelectedBorderThickness="0" CheckHintBrush="{ThemeResource ListViewItemCheckHintThemeBrush}" CheckBrush="{ThemeResource ListViewItemCheckThemeBrush}" ContentMargin="3" ContentTransitions="{TemplateBinding ContentTransitions}" CheckSelectingBrush="{ThemeResource ListViewItemCheckSelectingThemeBrush}" DragForeground="{ThemeResource ListViewItemDragForegroundThemeBrush}" DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}" DragBackground="{ThemeResource ListViewItemDragBackgroundThemeBrush}" DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}" FocusBorderBrush="{ThemeResource ListViewItemFocusBorderThemeBrush}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" PointerOverBackgroundMargin="1" PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackgroundThemeBrush}" PointerOverBackground="{ThemeResource ListViewItemPointerOverBackgroundThemeBrush}" ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}" SelectedPointerOverBorderBrush="{ThemeResource ListViewItemSelectedPointerOverBorderThemeBrush}" SelectionCheckMarkVisualEnabled="False" SelectedForeground="{ThemeResource ListViewItemSelectedForegroundThemeBrush}" SelectedPointerOverBackground="{ThemeResource ListViewItemSelectedPointerOverBackgroundThemeBrush}"  VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="Thumb" x:Key="MyThumbStyle">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Thumb">
                        <Image x:Name="imgPaid"
                   Margin="1"
                   Opacity="1"
                   ToolTipService.ToolTip="Paid Check" Source="Assets/paid_check.gif" />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
    </Page.Resources>
    <Grid
        x:Name="RootPanel"
        Background="#FF98DEF8"
        Opacity=".75"
        HorizontalAlignment="Stretch"
        VerticalAlignment="Stretch">

        <Grid x:Name="LayoutRoot" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Width="900" Height="630" >
            <Grid.RowDefinitions>
                <RowDefinition Height="40" />
                <RowDefinition Height="580" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="300" x:Name="colMainCheck" />
                <ColumnDefinition Width="2*" x:Name="colSplitChecks" />
            </Grid.ColumnDefinitions>

            <Canvas Name="SplitChecksHeader0" Grid.Row="0"  Grid.Column="0" Grid.ColumnSpan="2" Background="Gray" >
                <TextBlock HorizontalAlignment="Center" FontSize="30" TextWrapping="Wrap" Margin="5,5,0,0" VerticalAlignment="Top" Text="Order No :"/>
                <TextBlock x:Name="lblOrderNo" HorizontalAlignment="Center" FontSize="30" TextWrapping="Wrap" Text="1" Margin="150,5" VerticalAlignment="Top"/>
                <TextBlock HorizontalAlignment="Center" FontSize="30" TextWrapping="Wrap" Margin="250,5,0,0" VerticalAlignment="Top" Text="Table  No :"/>
                <TextBlock x:Name="lblTableNo" HorizontalAlignment="Center" FontSize="30" TextWrapping="Wrap" Text="1" Margin="400,5" VerticalAlignment="Top"/>
                <ListView x:Name="MenuItems" HorizontalAlignment="Center" Margin="0,0,0,0" Background="White" VerticalAlignment="Top" ItemContainerStyle="{StaticResource ListViewItemStyleOpenRPOS}" >
                    <ListView.ItemContainerTransitions>
                        <TransitionCollection/>
                    </ListView.ItemContainerTransitions>
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <Grid Margin="0,0,0,0" >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="220" />
                                    <ColumnDefinition Width="70" />
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" Text="{Binding MenuItemName}" FontSize="20" Margin="5,0,0,0" />
                                <TextBlock Grid.Column="1" Text="{Binding DisplayPrice}" FontSize="20" Margin="0,0,18,0"  HorizontalAlignment="Right" />
                            </Grid>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>

            </Canvas>
            <ScrollViewer Grid.Row="1" Grid.Column="0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"  Grid.ColumnSpan="2" Margin="0,0,0,-10">
                <Canvas Name="SplitChecksContainer" Width="900" Background="Beige" ScrollViewer.HorizontalScrollMode="Auto" >

                </Canvas>
            </ScrollViewer>
  
                    <Button Grid.Column="1" Grid.Row="0" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center" Height="45" Width="58" Click="btnCancel_Click" Background="Transparent" ToolTipService.ToolTip="Close Window">
                <StackPanel Orientation="Horizontal">
                    <Image Source="Assets/ClosePopup.png"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch"  Margin="0"/>
                </StackPanel>
            </Button>
        </Grid>

    </Grid>
</Page>
